#-*-coding:utf-8-*-
import requests
import os
#hosts源地址
url='https://coding.net/u/scaffrey/p/hosts/git/raw/master/hosts'
r=requests.get(url)
with open('hosts','w') as fq:
	fq.write(r.text)
os.popen(r'copy /y "hosts" "%SystemRoot%\System32\drivers\etc\hosts"')
os.popen('ipconfig /flushdns')